Measuring method and device, machine tool having such device, and work processing method

ABSTRACT

A method of measuring the position of the cutting edge of a tool T mounted to a spindle  14  of an NC machine tool includes steps of measuring the dimension of the center of an end surface of the spindle  14  relative a reference position in a machine coordinate system of the machine tool in the axial directions of the X-, Y- and Z-axes, measuring the dimensions of the position of the cutting edge of the tool T mounted to the spindle  14  relative to the center of the end surface of the spindle  14  in the axial directions of the X-, Y- and Z-axes, obtaining the dimensions of the position of the cutting edge of the tool T mounted to the spindle  14  relative to the reference position in the machine coordinate system through a calculation on the basis of the relative dimensions of the center of the end surface of the spindle  14  in the machine coordinate system and the dimensions of the position of the cutting edge of the tool T mounted to the spindle  14.

FIELD OF THE INVENTION

The invention relates to a method of and an apparatus for measuring theposition of a measurement point of a measuring target, and in particularto a method of and an apparatus for measuring the position of thecutting edge of a tool mounted to a spindle for the purpose of precisefinish with an NC machine tool such as an NC milling machine andmachining center, and to a machine tool having the apparatus and amethod of machining a workpiece.

BACKGROUND ART

In the field of the machine tool, the requirements of the accuracy offinishing have been increased year by year, and recently an accuracy ofsubmicron order is often required. In order to improve the accuracy offinishing, machine tools are developed so as to measure the dislocationof the tool relative to the spindle and the thermal expansion in thespindle.

As a first prior art, Japanese Unexamined Patent Publication (Kokai) No.11-138392 discloses an NC machine tool which can measure, during therotation of a tool, the cutting edge of the tool, the tool diameter, thetool length and the tool shape. The NC machine tool is provided with anoptical tool measuring instrument which generates a fine linear beambetween a projector and a receiver. A tool is mounted to the spindle,moved relative to the table in X-, Y- and X-axial directions to approachthe beam in a predetermined direction. The center of the tool, the tooldiameter and the tool length, defined in the NC program for the NCmachine tool, are corrected on the basis of the X-, Y- and Z coordinateswhen the tool intercepts the beam.

As a second prior art, Japanese Unexamined Patent Publication (Kokai)No. 10-309653 discloses a machine tool in which the position of thecutting edge of a tool rotating in a high speed is accurately measured.In this machine tool, a reference block is fixed onto a top of a table.A displacement gauge, for measuring the distance to the reference block,is provided to a spindle housing. Another displacement gauge, formeasuring the distance of the spindle end or a tool holder relative tothe housing, is provided to the spindle housing. The displacement of theend of the spindle housing and the displacement of the spindle relativeto the end of the spindle housing are obtained to correct the change inthe position of the cutting edge of a tool.

In the first prior art, the position of the center of a tool, the tooldiameter and the tool length is measured by the beam in non-contactingmanner during the rotation of the tool to correct the machining program.However, the optical measurement has a problem that because theconfiguration of the tool tip is complex, the measured point is notclear in a the rotating tool and the accuracy of measurement is low.Another type of non-contacting distance measurement using such as aelectrostatic capacity or eddy current also cannot solve the problem ofthe low measurement accuracy because the measure point is not clear in arotating tool

In the second prior art, there is a problem that only the change in thetool length in the direction of the axis of the spindle or Z-axis can bemeasured but the apparent increase in the tool diameter due to a tilt oran offset of a tool relative to the spindle and the decrease in the tooldiameter due to wear of the cutting edge of a tool cannot be measured.

SUMMARY OF THE INVENTION

The invention is directed to solve the above-described problems of theprior art and the object of the invention is to provide a method of andan apparatus for measuring the position of the cutting edge of a toolmounted to the end of the spindle of an NC machine tool with a highaccuracy.

Further, the object of the invention is to provide a method of and anapparatus for measuring the position of a measurement point of ameasuring target machine coordinate system with a high accuracy.

Further, the object of the invention is to provide a machine toolimproved to measure the position of the cutting edge of a tool mountedto the end of the spindle.

Further, the object of the invention is to provide a method of machininga workpiece with a high accuracy by measuring the position of thecutting edge of a tool mounted to the end of the spindle.

Further, the object of the invention is to provide a tool presetterwhich can measure the tool length and tool diameter.

According to the invention, there is provided a method of measuring theposition of a cutting edge of a tool mounted to a spindle of an NCmachine tool, comprising the steps of:

measuring the dimension of a reference position of the spindle relativea reference coordinate position of the machine tool in at least an axialdirection of the X-, Y- and Z-axes during when the spindle rotates or isstationary after the rotation;

measuring the dimension of the position of a cutting edge of a toolmounted to the spindle relative to the reference position of the spindlein the axial direction when the spindle rotates or is stationary; and

obtaining the dimension of the position of a cutting edge of a toolmounted to the spindle relative to the reference coordinate positionthrough a calculation on the basis of the relative dimensions measuredin the previous two steps.

Further according to the invention, there is provided a method ofmeasuring the position of a cutting edge of a tool mounted to a spindleof an NC machine tool, comprising the steps of:

measuring the coordinate position in the coordinate system of themachine tool when the reference position of the spindle is positioned ata predetermined position and when the spindle rotates or is stationaryafter the rotation;

measuring the position of a cutting edge of a tool mounted to thespindle relative to the reference position of the spindle when thespindle rotates or is stationary after the rotation;

obtaining the coordinate position of a cutting edges of the tool mountedin the coordinate system through a calculation on the basis of therelative dimensions measured in the previous two steps.

Further according to the invention, there is provided a method ofmeasuring the position of a cutting edge of a tool mounted to a spindleof an NC machine tool, comprising the steps of:

measuring the coordinate position in the coordinate system of themachine tool when the reference position of the spindle is positioned ata predetermined position and when the spindle rotates or is stationaryafter the rotation;

measuring the position of a cutting edge of a tool mounted to thespindle relative to the reference position of the spindle when thespindle rotates or is stationary after the rotation;

measuring the changes in the position of the reference position of thespindle relative to the spindle housing of the machine tool

obtaining the coordinate position of a cutting edges of the tool mountedin the coordinate system through a calculation on the basis of therelative dimensions measured in the previous three steps.

Further according to the invention, there is provided a method ofmeasuring a measurement the coordinate position of a measuring targetpoint of a measuring object in a machine coordinate system by usingcontacting or non-contacting displacement measuring means, comprisingthe steps of:

moving the measuring target point of the measuring object into themeasurement range of the displacement measuring means by the relativemovement between the displacement measuring means and the measuringobject along a direction same as a measurable direction of thedisplacement measuring means;

detecting the output value of the displacement measuring means and thecoordinate position in the machine coordinate system at a predeterminedmeasurement timing;

obtaining the coordinate position of the measuring target point of themeasuring object in the machine coordinate system relative to thereference position of the displacement measuring means through acalculation on the basis of the detected output value of thedisplacement measuring means and the coordinate position in the machinecoordinate system.

Further according to the invention, there is provided a method ofmeasuring the coordinate position of a reference position of a spindleor a reference position of a masterpiece having a known size mounted toa spindle by using contacting or non-contacting displacement measuringmeans attached to an constitutional member movable relative to thespindle of an NC machine tool, comprising the steps of:

moving the reference position of the spindle or the reference positionof the masterpiece attached to the spindle into the measurable range ofthe displacement measuring means by the relative movement along adirection same as a measurable direction of the displacement measuringmeans;

detecting the output value of the displacement measuring means and thecoordinate position in the machine coordinate system of the NC machinetool at a predetermined measurement timing;

obtaining the coordinate position in the coordinate system of thereference position of the spindle or the reference position of themasterpiece attached to the spindle relative to the reference positionof the displacement measuring means through a calculation on the basisof the detected output value of the displacement measuring means and thecoordinate position in the machine coordinate system.

Further according to the invention, there is provided a method ofmeasuring the coordinate position of a measuring target cutting edge ofa tool mounted to a spindle by using contacting or non-contactingdisplacement measuring means attached to an constitutional membermovable relative to the spindle of an NC machine tool, comprising thesteps of:

moving the measuring target cutting edge of the tool into the measurablerange of the displacement measuring means by the relative movement alonga direction same as a measurable direction of the displacement measuringmeans;

detecting the output value of the displacement measuring means and thecoordinate position in the machine coordinate system of the NC machinetool at a predetermined measurement timing;

obtaining the coordinate position in the coordinate system of themeasuring target cutting edge of the tool relative to the referenceposition of the displacement measuring means through a calculation onthe basis of the detected output value of the displacement measuringmeans and the coordinate position in the machine coordinate system.

Further according to the invention, there is provided a method ofmeasuring the coordinate position of a measurement point of a workpieceor a reference position of a workpiece fixture movable relative to thespindle side by using contacting or non-contacting displacementmeasuring means provided on a spindle or a spindle head of an NC machinetool, comprising the steps of:

moving the measurement point of a workpiece or the reference position ofthe workpiece fixture into the measurable range of the displacementmeasuring means by the relative movement along a direction same as ameasurable direction of the displacement measuring means;

detecting the output value of the displacement measuring means and thecoordinate position in the machine coordinate system of the NC machinetool at a predetermined measurement timing;

obtaining the coordinate position in the coordinate system of themeasurement point of a workpiece or the reference position of theworkpiece fixture relative to the reference position of the displacementmeasuring means through a calculation on the basis of the detectedoutput value of the displacement measuring means and the coordinateposition in the machine coordinate system.

Further according to the invention, there is provided a method ofmeasuring the tool length of a tool mounted to a spindle by usingcontacting or non-contacting displacement measuring means provided aconstitutional member movable in Z-axis relative to the spindle of an NCmachine tool, the displacement measuring means being capable ofmeasuring the displacement in Z-axis direction, the method comprisingthe steps of:

moving the reference position of the spindle or a reference position ofa masterpiece having a known length and mounted to the spindle into themeasurable range of the displacement measuring means by the relativemovement;

preliminary detecting the output value of the displacement measuringmeans and the coordinate position of Z-axis in the machine coordinatesystem of the NC machine tool at a predetermined measurement timing;

storing the detected value and the value of the length of themasterpiece as calibration data or storing calibration data calculatedon the basis of the detected value and the value of the length of themasterpiece;

moving the cutting edges of a tool to be measured, the tool beingmounted to the spindle, into the measurable range of the displacementmeasuring means by the relative movement;

detecting the output value of the displacement measuring means and thecoordinate position of Z-axis in the machine coordinate system of the NCmachine tool at a predetermined measurement timing;

obtaining the tool length of the tool relative to the reference positionof the spindle or the reference position of the masterpiece attached tothe spindle through a calculation on the basis of the stored calibrationdata, the detected output value of the displacement measuring meansconcerning the tool to be measured and the coordinate position of Z-axisin the machine coordinate system of the NC machine tool.

Further according to the invention, there is provided a method ofmeasuring the tool diameter of a tool mounted to a spindle by usingcontacting or non-contacting displacement measuring means mounted to aconstitutional member movable relative to a spindle of an NC machinetool, the displacement measuring means being capable of measuring thedisplacements in X- and Y-axes directions, the method comprising thesteps of:

moving a side face of a masterpiece having a known diameter and mountedto the spindle into the measurable range of the displacement measuringmeans by the relative movement;

preliminary detecting the output value of the displacement measuringmeans and the coordinate position of X- or Y-axis in the machinecoordinate system of the NC machine tool at a predetermined measurementtiming;

storing the detected value and the value of the diameter of themasterpiece as calibration data or storing calibration data calculatedon the basis of the detected value and the value of the diameter of themasterpiece;

moving the measurement point of the cutting edges of a tool to bemeasured, the tool being mounted to the spindle, into the measurablerange of the displacement measuring means by the relative movement;

detecting the output value of the displacement measuring means and thecoordinate position of X- or Y-axis in the machine coordinate system ofthe NC machine tool at a predetermined measurement timing;

obtaining the diameter of the cutting edge of the tool through acalculation on the basis of the stored calibration data, the detectedoutput value of the displacement measuring means concerning the tool tobe measured and the coordinate position of X- or Y-axis in the machinecoordinate system of the NC machine tool.

Further according to the invention, there is provided a method ofobtaining abrasion loss in the tool length or tool diameter through acalculation on the basis of the difference, before and after a progressof a machining process, in the tool lengths or diameters of the cuttingedge, which are obtained by the measuring method according to claim 8 or9.

Further according to the invention, there is provided a method ofmeasuring the distance between two measuring surfaces of a workpiecemovable relative to a spindle or a spindle head by using contacting ornon-contacting displacement measuring means provided on the spindle orthe spindle head of an NC machine tool, the displacement measuring meansbeing capable of measuring the displacements in X- and Y-axesdirections, the method comprising the steps of:

providing the displacement measuring means so as to be able to measurethe displacement in the direction of distance to be measured;

moving the measuring surfaces into the measurable range of thedisplacement measuring means by the relative movement;

detecting the output value of the displacement measuring means and thecoordinate position in the coordinate system of the NC machine tool at apredetermined measurement timing;

obtaining the distance between the two surfaces in the workpiece througha calculation on the basis of the detected output values of thedisplacement measuring means at the two measuring surfaces and thecoordinate position.

The step of detecting the output value of the displacement measuringmeans and the coordinate position in the coordinate system at thepredetermined timing may include a step of detecting he output value ofthe displacement measuring means and the coordinate position in thecoordinate system after the relative movement of the displacementmeasuring means is stopped within the measurement range.

The step of detecting the output value of the displacement measuringmeans and the coordinate position in the coordinate system at thepredetermined timing may include a step of detecting he output value ofthe displacement measuring means and the coordinate position in thecoordinate system when the relative movement of the displacementmeasuring means is executed within the measurement range.

The coordinate position in the coordinate system detected at thepredetermined timing may be selected from the value of the indication ofa feed shaft position reading means provided on a feed shaft, an NCcommand value for a feed shaft or a position obtained from an NC commandvalue for a feed shaft added with a position deviation obtained from aservo-control unit.

Further according to the invention, there is provided an apparatus formeasuring the position of a cutting edge of a tool mounted to a spindleof an NC machine tool, comprising:

feed shaft position reading means for reading the coordinate position ofthe coordinate system of the machine tool;

first shaft reference position measuring means, provided on aconstitutional member movable relative to the spindle, for measuring thecoordinate position of the reference position of the spindle in thecoordinate system;

tool cutting edge position measuring means, provided on a constitutionalmember movable relative to the spindle, for measuring the position of acutting edge of a tool relative to a reference surface of the spindle;and

calculation means for calculating the coordinate position of the cuttingedge of a tool in the coordinate system on the basis of the outputvalues of the feed shaft position reading means, the first shaftreference position measuring means and the tool cutting edge positionmeasuring means.

The tool cutting edge position measuring means may comprise a contactingor non-contacting displacement measuring sensor.

Further according to the invention, there is provided an apparatus formeasuring the position of a cutting edge of a tool mounted to a spindleof an NC machine tool, comprising:

feed shaft position reading means for reading the coordinate position ofthe coordinate system of the machine tool;

position measuring means, provided on a constitutional member movablerelative to the spindle, for measuring the coordinate position of thereference position of the spindle in the coordinate system and theposition of a cutting edge of a tool relative to the reference positionof the spindle; and

calculation means for calculating the coordinate position of the cuttingedge of a tool in the coordinate system on the basis of the outputvalues of the feed shaft position reading means and the positionmeasuring means.

Further according to the invention, there is provided an apparatus formeasuring the position of a cutting edge of a tool mounted to a spindleof an NC machine tool, comprising:

feed shaft position reading means for reading the coordinate position ofthe coordinate system of the machine tool;

first shaft reference position measuring means, provided on aconstitutional member movable relative to the spindle, for measuring thecoordinate position of the reference position of the spindle in thecoordinate system;

tool cutting edge position measuring means, provided on a constitutionalmember movable relative to the spindle, for measuring the position of acutting edge of a tool relative to a reference surface of the spindle;

second shaft reference position measuring means, provided on a spindlehousing of the NC machine tool, for measuring the changes in theposition of the reference position of the spindle relative to thespindle housing during the rotation; and

calculation means for calculating the coordinate position of the cuttingedge of a tool in the coordinate system on the basis of the outputvalues of the feed shaft position reading means, the first shaftreference position measuring means, the tool cutting edge positionmeasuring means and the first shaft reference position measuring means.

Further according to the invention, there is provided an apparatus formeasuring the coordinate position of measuring surface of a target byusing the displacement measuring means, comprising:

contacting or non-contacting displacement measuring means which canmeasure the displacement at least one axial direction of X-, Y- andZ-axis;

coordinate position sensor means for detecting the coordinate positionof the coordinate system of the relative movement between the measuringtarget point of the measuring object the displacement measuring means;and

calculating means for obtaining the coordinate position in thecoordinate system of the measuring target point of the measuring objectrelative to the reference position of the displacement measuring meansthrough a calculation on the basis of the output value of thedisplacement measuring means and the output value of the coordinateposition sensor means at a predetermined measurement timing after themeasuring target point of the measuring object is moved into themeasurable range of the displacement measuring means by the relativemovement along a direction same as a measurable direction of thedisplacement measuring means.

Further according to the invention, there is provided an apparatus formeasuring, wherein the coordinate position sensor means determines thevalue of the indication of a feed shaft position reading means providedon a feed shaft, an NC command value for a feed shaft or a positionobtained from an NC command value for a feed shaft added with a positiondeviation obtained from a servo-control unit as the coordinate positionof the coordinate system of the relative movement.

Further according to the invention, there is provided a machine tool formachining a workpiece with a numerically controlled relative movementbetween a spindle to which a tool is mounted and a table to which theworkpiece is fixed, comprising:

feed shaft position reading means for reading the coordinate position ofthe coordinate system of the machine tool;

first shaft reference position measuring means, provided on aconstitutional member movable relative to the spindle, for measuring thecoordinate position of the reference position of the spindle in thecoordinate system;

tool cutting edge position measuring means, provided on a constitutionalmember movable relative to the spindle, for measuring the position of acutting edge of a tool relative to a reference surface of the spindle;

calculation means for calculating the coordinate position of the cuttingedge of a tool in the coordinate system on the basis of the outputvalues of the feed shaft position reading means, the first shaftreference position measuring means and the tool cutting edge positionmeasuring means; and

correcting means for correcting the numeric control command on the basisof the coordinate position of the cutting edge of a tool in thecoordinate system calculated by the calculating means.

Further according to the invention, there is provided a machine tool formachining a workpiece with a numerically controlled relative movementbetween a spindle to which a tool is mounted and a table to which theworkpiece is fixed, comprising:

feed shaft position reading means for reading the coordinate position ofthe coordinate system of the machine tool;

first shaft reference position measuring means, provided on aconstitutional member movable relative to the spindle, for measuring thecoordinate position of the reference position of the spindle in thecoordinate system;

tool cutting edge position measuring means, provided on a constitutionalmember movable relative to the spindle, for measuring the position of acutting edge of a tool relative to a reference surface of the spindle;

workpiece reference position measuring means for measuring thecoordinate position of the reference position of the workpiece in thecoordinate system;

calculation means for calculating the position of a cutting edge of atool relative to the reference position of the workpiece on the basis ofthe output values of the feed shaft position reading means, the firstshaft reference position measuring means and the tool cutting edgeposition measuring means; and

correcting means for correcting the numeric control command on the basisof the position of a cutting edge of a tool relative to the referenceposition of the workpiece calculated by the calculating means.

Further according to the invention, there is provided a machine tool formachining a workpiece with a numerically controlled relative movement inthree axial directions of X-, Y- and Z-axes between a spindle to which atool is mounted and a table to which the workpiece is fixed, comprising:

contacting or non-contacting displacement measuring means which canmeasure the displacement of a measuring target point of the spindle, thetool or the workpiece at least one axial direction of X-, Y- and Z-axis;

coordinate position sensor means for detecting the coordinate positionof the coordinate system of the relative movement between the measuringtarget point the displacement measuring means; and

calculating means for detecting the output value of the displacementmeasuring means and the output value of the coordinate position sensormeans at a predetermined measurement timing after the measuring targetpoint of the measuring object is moved into the measurable range of thedisplacement measuring means by the relative movement along a directionsame as a measurable direction of the displacement measuring means toobtain the coordinate position in the coordinate system of the measuringtarget point relative to the reference position of the displacementmeasuring means through a calculation on the basis of the detectedoutput values.

Further according to the invention, there is provided a method ofmachining a workpiece into a desired shape with an NC machine tool whichnumerically controls the relative movement between a spindle to which atool is mounted and a table to which the workpiece is fixed relativelyto each other, the method comprising the steps of:

measuring the coordinate position in the machine coordinate system whena reference position of the spindle is positioned at a predeterminedposition and when the spindle rotates or is stationary after therotation;

measuring the position of a cutting edge of a tool mounted to thespindle relative to the reference position of the spindle when thespindle rotates or is stationary;

obtaining the coordinate position of the cutting edges of the tool inthe coordinate system through a calculation on the basis of the valuesmeasured in the previous two steps; and

obtaining a correction for the numeric control command for machining theworkpiece on the basis of the coordinate position of the cutting edge ofthe tool mounted to the spindle in the coordinate system.

Further according to the invention, there is provided a method ofmachining a workpiece into a desired shape with an NC machine tool whichnumerically controls the relative movement in three axial directions ofX-, Y- and Z-axes between a spindle to which a tool is mounted and atable to which the workpiece is fixed relatively to each other, themethod comprising the steps of:

moving the measuring target point of the spindle, the tool or theworkpiece into the measurement range of the displacement measuring meansthrough the relative movement by using contacting or non-contactingdisplacement measuring means along a direction same as a measurabledirection of the displacement measuring means;

detecting the output value of the displacement measuring means and thecoordinate position in the coordinate system of the relative movement ata predetermined measurement timing;

obtaining the coordinate position of the measuring target point in thecoordinate system relative to the reference position of the displacementmeasuring means through a calculation on the basis of the detectedoutput value and the coordinate position of the coordinate system tomachine the workpiece.

Further according to the invention, there is provided a tool presetterfor measuring and registering the tool length of diameter of the cuttingedges of a tool mounted to a spindle of an NC machine tool, comprising:

displacement measuring means which is movable relative to a toolmounting portion and capable of measuring the displacements in X-, Y-and X-axial directions;

feed shaft position reading means for reading the coordinate position ofthe coordinate system of the relative movement;

calculating means for detecting the output value of the displacementmeasuring means and the output value of displacement measuring means ata predetermined measurement timing after a reference position of amasterpiece having a known size mounted to the tool mounting portion,the cutting edge of the tool mounted to the tool mounting portion or theoutermost side surface of the tool is moved into the measurable range ofthe displacement measuring means by the relative movement and forobtaining the coordinate position in the coordinate system of thereference position of the masterpiece, the cutting edges of the tool orthe outermost side surface of the tool on the basis of the detectedoutput values and the value of the size of the masterpiece and forcalculating the tool length or tool diameter of the tool.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is block diagram showing the configuration of an NC machine toolaccording to an embodiment of the invention.

FIG. 2 is a section of first spindle reference position measuring means.

FIG. 3 is a schematic illustration for explaining the method ofobtaining the coordinate of the center of the end of the spindle inwhich the first spindle reference position measuring means of FIG. 2 isviewed form the top thereof.

FIG. 4 is an illustration for explaining the method of measuring thetool length or the position of the cutting edge of a tool in Z-axis.

FIG. 5 is an illustration for explaining the method of measuring thetool diameter of the cutting edges at the end of a tool.

FIG. 6 is an illustration for explaining the method of measuring thetool diameter of the cutting edges at the end of a tool.

FIG. 7 is a section of second spindle reference position measuringmeans.

FIG. 8 is a block diagram of a measuring apparatus for measuring theposition of the cutting edges of a tool in Z-axis and the tool lengthaccording to an embodiment of the invention.

FIG. 9A is a flow chart showing an operation for measuring the positionof the cutting edges of a tool in Z-axis and the tool length accordingto an embodiment of the invention.

FIG. 9B is a flow chart showing an operation for measuring the positionof the cutting edges of a tool in Z-axis and the tool length accordingto an embodiment of the invention.

BEST MODE FOR CARRYING OUT THE INVENTION

A first embodiment of the invention will be described below withreference to the accompanying drawings.

In FIG. 1, a machine tool unit 10 of an NC machine tool according to thefirst embodiment includes a spindle unit 12 having a spindle 14rotatably supported and built in a spindle housing. The spindle unit 12is movable in three orthogonal directions of X, Y and Z relatively to atable 16 with a workpiece W fixed thereon by an X-axis feed motor M_(X),a Y-axis feed motor M_(Y) and a Z-axis feed motor M_(Z), respectively. Atool T is mounted at the forward end of the spindle 14. The workpiece Wis cut by rotating the tool T and machined to a desired shape whilebeing moved along the X-, Y- and Z-axes relatively.

An NC device 20 for controlling the relative movement of the spindleunit 12 and the table 16 of the machine tool unit 10 along the X-, Y-and Z-axes includes, as main component elements, a program storage unit20 a for storing a machining program, a tool edge position measuringprogram, etc., a program analysis unit 20 b for analyzing the programstored in the program storage unit 20 a, an operation command unit 20 cfor generating a sequential move command in accordance with the programanalyzed and an axial motion command unit 20 d having a servo amplifier,for example, for driving the X-axis feed motor M_(X), the Y-axis feedmotor M_(Y) and the Z-axis feed motor M_(Z) in accordance with themotion command. The position of the spindle unit 12 relative to thetable 16 is measured by each of X, Y and Z position reading units 18such as a digital scale arranged on each axis of the machine tool unit10 and fed back each moment to the axial motion command unit 20 d. Adisplay unit 26 displays the reading of the X, Y and Z position readingunits 18 and the various values calculated by an calculating unit 24.

According to the first embodiment, a first spindle reference positionmeasuring unit 28 and a tool edge position measuring unit 30 areprovided for measuring the cutting edge position of the tool T mountedat the forward end of the spindle 14.

Referring to FIGS. 2 and 3, the first spindle reference positionmeasuring unit 28 includes a plurality of distance sensors 38 a, 38 b,40, 42 a, 42 b (FIG. 3) fixed on a base frame 36. The distance sensors38 a, 38 b, 40, 42 a, 42 b each can be configured of, for example, anon-contacting distance sensor of eddy current type or electrostaticcapacitance type. The base frame 36 is a cylindrical or prismatic hollowmember composed of a material such as invar having a small coefficientof thermal expansion, and a bottom wall 36 a is formed at apredetermined height on the inner surface thereof. The bottom wall 36 ahas a central opening 36 b. A tool T is inserted into the centralopening 36 b for measurement, as shown in FIG. 2. Therefore, the bottomwall 36 a is arranged under the bottom wall 36 a at such a height as toform a space capable of accommodating the forward end of the tool T atleast at the time of measurement. The first spindle reference positionmeasuring unit 28 is accurately set in position fixedly on the uppersurface of a component member adapted for relative movement along X-, Y-and Z-axes with respect to the spindle 14, or according to the firstembodiment shown in FIG. 1, on the upper surface of the table 16 of themachine tool unit 10, for example.

A pair of X-direction distance sensors 38 a, 38 b and a pair ofY-direction distance sensors 42 a, 42 b for measuring the X-axisdistance and the Y-axis distance, respectively, with respect to the sidesurface of the spindle 14 stopped or in rotation, are arranged inopposed relation in X and Y directions, respectively, on the innersurface adjoining the upper end opening of the base frame 36. The centercoordinate O (X_(C), Y_(C)) of the first spindle reference positionmeasuring unit 28 is represented by the intersection between a linesegment connecting the centers of the measurement surfaces of theX-direction distance sensors 38 a, 38 b and a line segment connectingthe centers of the measurement surfaces of the Y-direction distancesensors 42 a, 42 b (FIG. 3), and is determined by the followingequations.X _(C)=½(X ₁ +X ₂)Y _(C)=½(Y ₁ +Y ₂)where X₁ is the X coordinate of the measurement surface of theX-direction distance sensor 38 a, which measurement surface is directedin position direction along X-axis, X₂ is the X coordinate of themeasurement surface of the X-direction distance sensor 38 b, whichmeasurement surface is directed in negative direction along X-axis, Y₁is the Y coordinate of the measurement surface of the Y-directiondistance sensor 42 a, which measurement surface is directed in positivedirection along Y-axis, and Y₂ is the Y coordinate of the measurementsurface of the Y-direction distance sensor 42 b, which the measurementsurface is directed in negative direction along Y-axis.

Further, a Z-direction distance sensor 40 for measuring the Z-axisdistance with respect to the end surface of the spindle stopped or inrotation is arranged on the upper surface of the bottom wall 36 a of thebase frame 36. More specifically, the Z-direction distance sensor 40 isarranged with the measurement surface thereof at a predetermined height,or according to this embodiment, at the height H from the upper surfaceof the table 16.

Referring to FIGS. 4 and 5, the tool edge position measuring unit 30 isa contacting displacement sensor and includes measuring probes orientedalong X-, Y- and Z-axes. These displacement sensors can specificallyinclude a distance measuring unit such as an optical scale, a magneticscale or a differential transformer. In FIGS. 4 and 5, only a Z-axismeasuring probe 30 a and an X-axis measuring probe 30 b oriented along Zand X axes, respectively, are shown for the tool edge position measuringunit 30. Actually, however, a Y-axis measuring probe oriented alongY-axis is also provided. Also, in spite of the fact that the tool edgeposition measuring unit 30 is shown to consist of only one measuringinstrument in FIG. 1, a measuring instrument can alternatively bearranged along each of X-, Y- and Z-axes, as shown in FIGS. 4 and 5.Further, the X-axis measuring probe 30 b of the tool edge positionmeasuring unit 30 is oriented in one direction (rightward in FIG. 5)along X-axis in FIG. 5. Preferably, however, measurement is possiblefrom both directions along X-axis with respect to the tool T. For thispurpose, a pair of displacement sensors can be arranged in opposedrelation to each other along X-axis or a single displacement sensor canbe adapted to rotate by 180 degrees around the rotation center alongZ-axis. This is also the case with the Y-axis displacement sensor. Thetool edge position measuring unit 30 may be a non-contactingdisplacement measuring sensor of laser type, electrostatic capacitancetype or eddy current type.

Now, the operation of the first embodiment will be explained.

First, the position of the center O_(CS) on the end surface of thespindle 14 is measured by the first spindle reference position measuringunit 28 as a reference position of the spindle 14 when the spindle 14 isstationary, or preferably, when the spindle 14 is stationary at apredetermined temperature or when the spindle 14 is rotating at amachining speed. In accordance with the tool edge position measuringprogram stored in the program storage unit 20 a, the spindle unit 12 ismoved along X-, Y- and Z-axes on the machine coordinate system by anX-axis feed motor M_(X), a Y-axis feed motor M_(Y) and a Z-axis feedmotor M_(Z). In this way, the spindle 14 is arranged at a position asshown in FIG. 2 with respect to the first spindle reference positionmeasuring unit 28 in such a manner that the center axis of the spindle14 coincides with the center O of the first spindle reference positionmeasuring unit 28 on the machine coordinate system.

No matter how accurately the spindle unit 12 is fabricated, however, theinclination or offset of the spindle 14 with respect to the spindlehousing cannot be removed completely due to such factors as thetemperature change of the machine environment and the thermal effect ofthe heat generated in the various parts of the machine caused by thehigh-speed rotation of the spindle 14. Therefore, the actual centercoordinate O_(CS) of the spindle end surface fails to coincide with thecenter of the spindle end surface determined in the machine coordinatesystem. In such a case, the X-Y coordinate O_(S) (X_(CS), Y_(CS)) of thecenter axis line of the spindle 14 can be determined from the equationsbelow by measuring the distances between the side surface of the spindle14 and the X- and Y-direction distance sensors 38 a, 38 b; 42 a, 42 b.X _(CS)=½((X ₁ +x ₁)+(X ₂ −x ₂))Y _(CS)=½((Y ₁ +x ₁)+(Y ₂ −x ₂))where x₁ is a measurement of the X-direction distance sensor 38 aconstituting the distance between the measurement surface of theX-direction distance sensor 38 a and the side surface of the spindle 14,x₂ is a measurement of the X-direction distance sensor 38 b constitutingthe distance between the measurement surface of the X-direction distancesensor 38 b and the side surface of the spindle 14, y₁ is a measurementof the Y-direction distance sensor 42 a constituting the distancebetween the measurement surface of the Y-direction distance sensor 42 aand the side surface of the spindle 14, and y₂ is a measurement of theY-direction distance sensor 42 b constituting the distance between themeasurement surface of the Y-direction distance sensor 42 b and the sidesurface of the spindle 14,

On the other hand, the coordinate Z_(ES) of the end surface of thespindle 14 along Z-axis is given as Z_(ES)=H+z_(ES), where z_(ES) is ameasurement taken by the Z-direction distance sensor 40. Assuming thatthe first spindle reference position measuring unit 28 is accurately setin position within the desired precision on the machine coordinatesystem, the deviation Δ of the center O_(CS) of the end surface of thespindle 14 from the machine coordinate system is given by the followingequations.Δ(ΔX,ΔY,ΔZ)=O _(CS)(X _(CS) ,Y _(CS) ,Z _(ES))−(X _(C) ,Y _(C) ,Z _(C)),ΔX=X _(CS) −X _(C)=½(x ₁ −x ₂),ΔY=Y _(CS) −Y _(C)=½(y ₁ −y ₂),ΔZ=Z _(ES) −Z _(C),where ΔX is the deviation in X direction, ΔY is the deviation in Ydirection, ΔZ is the deviation in Z direction, and Z_(C) is the Zcoordinate of the end surface of the spindle 14 in the machinecoordinate system (the reading of the X, Y and Z position readers 18 onthe Z-direction scale).

In this way, the deviations ΔX, ΔY and ΔZ calculated in the calculatingunit 24 are output to a correcting unit 22. These values are stored inthe correcting unit 22 as relative values between the reference positionof the machine coordinate system and the reference of the spindle of themachine tool.

When the tool is changed or the tool is assumed to have been worn, orpreferably when the tool temperature is near that for machiningoperation, the tool rotation angle position is indexed as required withthe spindle stopped while measuring the cutting edge position of thetool T with the tool edge position measuring unit 30 in the followingmanner.

Referring to FIG. 4, a method of measuring the length (tool length)L_(T) along the center axis of the tool T will be explained. The toollength L_(T) is defined as the distance from the end surface of thespindle 14 to the forward end of the tool T.

The tool edge position measuring unit 30 is a contacting displacementmeasuring unit, and has a measuring probe oriented along each of the X-,Y- and Z-axes as described above. Of these probes, the Z-axis measuringprobe 30 a oriented along Z-axis is used for measuring the tool lengthL_(T). First, the spindle unit 12 is moved along X-, Y- and Z-axes withrespect to the table 16 thereby to arrange the end surface of thespindle 14 above the tool edge position measuring unit 30. From thisstate, the spindle unit 12 is moved downward along Z-axis, and the endsurface of the spindle 14 is brought into contact with the Z-axismeasuring probe 30 a oriented along Z-axis, as shown on the right sideof FIG. 4. As a result, the Z-axis measuring probe 30 a is moved downalong Z-axis, and an electrical signal corresponding to the displacementis sent out each moment to the operation command unit 20 c and thecalculating unit 24. The signal sent to the operation command unit 20 coperates as a skip signal. The operation command unit 20 c, upon receiptof the skip signal, sends out a Z motor stop command to the axial motioncommand unit 20 d, with the result that the axial movement of thespindle unit 12 along Z-axis stops. The calculating unit 24 stores thedisplacement Z_(SO) of the Z measuring probe 30 a along Z-axis and the Zcoordinate Z_(MO) thereof on the machine coordinate system (the readingof the X, Y and Z position reading units on the scale along Z-axis).

With the tool T mounted on the spindle 14, the spindle unit 12 is movedrelatively to the table 16 along X-, Y- and Z-axes in such a manner thatthe center axis of the spindle 14 coincides with the center axis of theZ-axis measuring probe 30 a of the tool edge position measuring unit 30.From this state, the spindle unit 12 is moved down along Z-axis, and asshown on the right side of FIG. 4, the forward end of the tool T isbrought into contact with the Z-axis measuring probe 30 a oriented alongZ-axis. As a result, the Z-axis measuring probe 30 a is moved down alongZ-axis. An electrical signal corresponding to this displacement, asdescribed above, is sent out each moment to the operation command unit20 c and the calculating unit 20 d, so that the operation command unit20 c sends out a Z-axis motor stop command to the axial motion commandunit 20 d thereby to stop the spindle unit 12. In the process, thecalculating unit 24 stores the displacement Z_(ST) of the Z-axismeasuring probe 30 a along Z-axis and the Z coordinate Z_(MT) on themachine coordinate system through the X, Y and Z position reading units18. Thus, in FIG. 4, the tool length L_(T) is given asL _(T) =L _(T1) +L _(T2)(Z _(MT) −Z _(MO))+(Z _(SO) −Z _(ST))

In the case where the axial movement is stopped with the forward end ofthe tool T in contact with the Z measuring probe 30 a, the calculatingunit 24 stores the displacement Z_(ST) of the Z-axis measuring probe 30a along Z-axis and the Z coordinate Z_(MT) on the machine coordinatesystem through the X, Y and Z position reading units 18. This indicatesthat the position of the tool edge on the machine coordinate systemcould be defined (determined).

In similar fashion, in the case where the axial movement is stopped withthe spindle end surface in contact with the Z measuring probe 30 a, theposition of the spindle end surface on the machine coordinate systemcould be defined (determined) by the calculating unit 24. Thecalculating unit 24 arithmetically determines from the above-mentionedequation the tool length L_(T), i.e. the distance from the position ofthe spindle end surface to the tool edge position, based on thepositions of the tool edge and spindle end surface on this machinecoordinate system.

The detection accuracy is very high, since as described above, the axialmovement is stopped with the tool edge and the spindle end surface incontact with the displacement measuring means, and the reading of thedisplacement measuring means and the reading of the X, Y and Z positionreading means are detected. In the conventional method for detecting thereading of the X, Y and Z position reading means by the skip signalgenerated the moment a touch probe is contacted, the measurementaccuracy is deteriorated more, the higher the contacting speed, andtherefore the contacting speed is required to be reduced. This is due tothe unavoidable problem posed by the support structure of the touchprobe and the structure for retrieving the detection signal. In themethod using the displacement measuring means according to theinvention, on the other hand, the reading of the displacement measuringmeans and the X, Y and Z displacement measuring means are detected instationary state, and therefore the measurement accuracy does not dependon the contacting speed. For the machine tool which requires theefficiency of the machining operation improved as far as possible,therefore, the time for measurement which constitutes the non-machiningtime can be shortened and the measurement with high accuracy is madepossible very advantageously.

Now, the method of measuring the diameter of the edge of the tool T willbe explained with reference to FIG. 5. The diameter of the edge of thetool T is measured using an X-axis measuring probe 30 b and a Y-axismeasuring probe (not shown) oriented along X and Y axes, respectively.The description that follows, however, deals only with the case wherethe tool edge position along X-axis is measured.

First, the spindle unit 12 is moved relatively to the table 16 along X-,Y- and Z-axes in such a manner that the side surface of the forward endportion of the spindle 14 may come into contact with the X-axismeasuring probe 30 b. From this state, the spindle unit 12 is broughtnear to the X-axis measuring probe 30 b along X-axis so that the sidesurface of the spindle 14 is brought into contact with the forward endof the X measuring probe 30 b. As a result, the X-axis measuring probe30 b is retreated along X-axis, and an electrical signal correspondingto the particular displacement is sent out each moment to the operationcommand unit 20 c and the calculating unit 24. The operation commandunit 20 c, upon receipt of this signal as a skip signal, sends out anX-axis motor stop command to the axial motion command unit 20 d. Thus,the spindle unit 12 stops the movement thereof along X-axis. Under thiscondition, the calculating unit 24 stores the displacement X_(SO) of theX-axis measuring probe 30 b along X-axis and the associated X coordinateX_(MO) thereof on the machine coordinate system.

Then, the spindle unit 12 is moved relatively to the table 16 along X-,Y- and Z-axes in such a manner that the cutting edge of the tool Tmounted on the spindle 14 which is to be measured can contact the X-axismeasuring probe 30 b. From this state, the spindle unit 12 is broughtnear to the tool edge position measuring unit 30 along X-axis, and thecutting edge of the tool T is brought into contact with the X-axismeasuring probe 30 b, as shown on the left side of FIG. 5. As a result,the X-axis measuring probe 30 b is retreated along X-axis. Under thiscondition, an electrical signal corresponding to the displacement of theX-axis measuring probe 30 b is sent out every moment to the operationcommand unit 20 c and the calculating unit 24. The operation commandunit 20 c, upon receipt of this signal as a skip signal, sends out anX-axis motor stop command to the axial motion command unit 20 d therebyto stop the spindle unit 12. At the same time, the calculating unit 24stores the displacement X_(ST) of the X-axis measuring probe 30 b alongX-axis and the associated X coordinate X_(MT) on the machine coordinatesystem. In this way, the radius X_(P) of the cutting edge of the tool Tas measured from right side in FIG. 5 is given asX _(P) =R _(S)−((X _(SO) −X _(MO))−(X _(ST) −X _(MT)))=R _(S)−((X _(MT) −X _(MO))+(X _(SO) −X _(ST)))

In the case where X_(MO)=X_(MT), the following equation is obtained.X _(P) =R _(S)−(X _(SO)−X_(ST))where R_(S) is the radius of the spindle 14 which is a known valuewithin the accuracy required for obtaining the desired machiningprecision.

In similar fashion, the radius X_(n) of the cutting edge of the tool Tis measured and calculated from the left side along X-axis in FIG. 5. Asimilar measurement is taken also along Y-axis, so that Y_(p) and Y_(n)for the cutting edge of the tool T are measured and calculated alongY-axis as shown in FIG. 6. In FIG. 6, characters X_(S), Y_(S) designatethe coordinate system of the spindle 14.

The center axis of the tool T mounted at the forward end of the spindle14 generally fails to coincide with the center axis of the spindle 14.Therefore, the tool T is rotated around the center axis of the spindle14. In this case, the apparent diameter D_(S) of the cutting edge of thetool T can be approximated by the following equation.D _(S)=2R=2((Max(X _(n) ,X _(p))²+(Max(Y _(n) ,Y _(p))²)^(1/2)

The calculating unit 24 calculates the apparent diameter D_(S) of thecutting edge of the tool T and outputs it to the correcting unit 22. Thecorrecting unit 22 stores this tool edge diameter D_(S) and the toollength L_(T) explained above, as relative sizes of the referenceposition of the spindle and the tool edge position.

As explained above, the cutting edge position of the tool T can beaccurately measured while the spindle 14 is stationary.

Once the cutting edge position of the stationary tool with respect tothe reference position has been determined on the machine coordinatesystem accurately, the displacement of the tool edge position due to thethermal elongation of the spindle 14 heated by the rotation thereof ismeasured in the manner described below.

The spindle 14 is rotated at high speed by driving a spindle motor (notshown) built in the spindle unit 12. Then, the temperature of thespindle 14 is increased by the heat generated from the spindle motor andthe internal friction of the spindle unit 12. After a predetermined timeof rotation of the spindle 14, the temperature increase of the spindle14 generally flattens out to a predetermined temperature, and thethermal elongation of the spindle 14 converges or is settled. Theconvergence or settlement of the thermal elongation of the spindle 14can be detected by stopping, at predetermined time intervals afterstarting the spindle 14, the spindle 14 and measuring the change of thecenter coordinate O_(CS) of the end surface of the spindle 14 using thefirst spindle reference position measuring unit 28 and comparing themeasurement with the previous measurement or the center coordinateO_(CS) while the spindle 14 is cool. Once the convergence or settlementof thermal elongation of the spindle 14 is detected, the cutting edgeposition of the tool T is measured by the method described above. Thecorrecting unit 22 generates a correction value based on the value ofthe cutting edge position of the tool T mounted on the spindle 14relative to the reference position on the machine coordinate systemdetermined as described, and sends out the correction value thusdetermined to the operation command unit 20 c.

After measurement of the cutting edge position of the tool T andgeneration of the correction value, the machining process is started inaccordance with the machining program stored in the program storage unit20 a. At a predetermined timing or upon the lapse of a predeterminedtime following the start of the machining process, when the workpiece Wor the tool T is changed or several machining steps of a given machiningprocess have been carried out, the center coordinate O_(CS) of the endsurface of the spindle 14 is measured with the spindle 14 stopped or inrotation. At the same time, the rotation of the tool T is stopped sothat the cutting edge position thereof is measured by the methoddescribed above thereby to update the correction value.

As described above, according to this embodiment, the tool edge positionwith respect to the reference position on the machine coordinate systemcan be accurately determined by measuring the relative values betweenthe reference position of the machine tool on the machine coordinatesystem and the reference position of the spindle in stationary state orrotation and the relative values between the reference position of thespindle and the cutting edge position of a stationary tool.

It has been described above that according to the first embodiment, acorrection value for the NC device 20 is determined by measuring therelative values between the reference position on the machine coordinatesystem and the center position of the end surface of the spindle 14using the first spindle reference position measuring unit 28, and alsomeasuring the relative values between the center position of the endsurface of the spindle 14 and the cutting edge position of the tool Tusing the tool edge position measuring unit 30. In this method, thecutting edge position of the tool T is measured intermittently. Sincethe end surface of the spindle 14 has a comparatively simple shape,however, the center position of the spindle 14 can be measuredcontinuously even while the workpiece is being machined.

According to a second embodiment described below, the correction valueis updated every moment by measuring the displacement of the centerposition of the spindle 14 while the workpiece is being machined.

Referring to FIGS. 1 and 7, according to the second embodiment, themachine tool unit 10 includes a second spindle reference positionmeasuring unit 32 in addition to the first spindle reference positionmeasuring unit 28 and the tool edge position measuring unit 30. Thesecond spindle reference position measuring unit 32 includes a frameunit 44 mounted on the end surface of the housing of the spindle unit 12adjoining the forward end portion of the spindle 14 and a plurality ofdistance sensors 48 a, 48 b, 48 c, 48 d, 50 mounted on the inside of theframe unit 44. A support portion 46 extending radially inward of thespindle 14 is arranged at the forward end (the lower end in the drawing)of the frame unit 44. Also, the frame unit 44 is so shaped as not toadversely affect the measurement of the center position O_(CS) of theend surface of the spindle 14 by the first spindle reference positionmeasuring unit 28. Two pairs of X-axis distance sensors 48 a to 48 d formeasuring the X-axis distance with respect to the side surface of thespindle 14 in rotation and two pairs of Y-axis distance sensors (notshown) for measuring the Y-axis distance with respect to the sidesurface of the spindle 14 in rotation are arranged in opposed relationsto each other in X and Y directions, respectively, on the inner surfaceof the frame unit 44. Further, a Z-axis distance sensor 50 for measuringthe Z-axis distance with respect to the end surface of the spindle 14 inrotation is arranged on the upper surface of the support portion 46.

Using a method similar to that for the first spindle reference positionmeasuring unit 28 described above, the distance between the side surfaceand the end surface of the spindle 14 and each of the distance sensors48 a, 48 b, 48 c, 48 d, 50 is measured during the machining process withthe spindle 14 in rotation, and the resulting measurements are output tothe calculating unit 24. The calculating unit 24 calculates thedisplacement of the center position of the end surface of the spindle 14based on the measurements, and outputs it to the correcting unit 22. Thecorrecting unit 22 generates a correction value based on thedisplacement of the center position of the end surface of the spindle 14with respect to the spindle housing.

According to the second embodiment, the displacement of the cutting edgeposition of the tool T is not measured during the machining process.Since the absolute value of the thermal elongation of the spindle 14 islarge as compared with the thermal elongation of the tool T, however,the machining accuracy can be improved also by measuring the thermalelongation of the spindle 14 and updating the correction value duringthe machining process. Also, according to the second embodiment, the twopairs of the X-axis distance sensors 48 a to 48 d for measuring theX-axis distance with respect to the side surface of the spindle 14 inrotation and the two pairs of Y-axis distance sensors for measuring theY-axis distance thereof are provided as described above. Nevertheless,one instead of two pairs of such sensors may be provided. Also, as shownin FIG. 1, the distance sensors for measuring the distance with respectto the side surface of the spindle 14 in rotation may be arranged onlyon one side of the spindle 14. As another alternative, a single insteadof a plurality of distance sensors may be provided. In the case wherethe two pairs of the X-axis distance sensors 48 a to 48 d and the twopairs of the Y-axis distance sensors are arranged along Z-axis, on theother hand, the change in the inclination or offset of the spindle 14with respect to the spindle housing can be measured.

In the first and second embodiments, the tool edge position measuringunit 30 may be done without, and the tool edge position can be measuredwith each sensor of the first spindle reference position measuring unit28 with the tool rotation stopped. In this case, the first spindlereference position measuring unit makes up the position measuring meansdescribed in claim 17 appended hereto.

The embodiments described above assume that the workpiece W isaccurately set in position on the machine coordinate system on the table16. In the third embodiment of the invention described below, however,the arrangement of the workpiece W on the machine coordinate system isalso taken into account.

According to the third embodiment, a workpiece reference positionmeasuring unit 34 (FIG. 1) is provided for measuring the referenceposition of the workpiece W with respect to the spindle 14. Theworkpiece reference position measuring unit 34 includes an axial portion34 a extending in longitudinal direction and a measuring probe 34 barranged at the forward end of the axial portion 34 a. The axial portion34 a of the workpiece reference position measuring unit 34 is adapted tobe mounted in a tool mounting hole (not shown) of the spindle 14. Asindicated by a two-dot chain in FIG. 1, the axial portion 34 a ismounted in the tool mounting hole according to a procedure similar tothat for automatic tool change. The spindle unit 12 is moved along X-,Y- and Z-axes relatively to the workpiece W fixed on the table 16, andthe measuring probe 34 b is brought into contact with a predeterminedreference position of the workpiece W thereby to measure the relativepositions of the workpiece W and the spindle 14. The reference positionof the workpiece W is not necessarily located at a specified point onthe workpiece W, but may include, for example, predetermined threeplanes perpendicular to X-, Y- and Z-axes, respectively, with thespindle unit 12 moved along X-, Y- and Z-axes. In the case where theworkpiece W is set in position with respect to the table 16 by bringingit into contact with the positioning means, i.e. what is called alocator accurately set in a predetermined position on the table 16, thereference positions of the workpiece W may be predetermined referencepositions of the locator, e.g. three planes thereof perpendicular to theX-, Y- and Z-axes, respectively.

The workpiece reference position measuring unit 34 is a contactingdisplacement measuring instrument similar to the tool edge positionmeasuring unit 30, and has the measuring probe 34 b thereof arrangeddisplaceably with respect to the axial portion 34 a. The measuring probe34 b, when coming into contact with the reference position of theworkpiece W, is displaced in the direction opposite to the direction inwhich the spindle unit 12 moves, and an electrical signal correspondingto the particular displacement is sent out every moment to the operationcommand unit 20 c and the calculating unit 24. The signal that has beensent out to the operation command unit 20 c functions as a skip signal.The operation command unit 20 c sends out to the axial motion commandunit 20 d a X-Y-Z feed rod motor stop command thereby to stop the axialmovement of the spindle unit 12. The calculating unit 24 calculates thevalue of the reference position of the workpiece relative to thereference position of the machine coordinate system based on thedisplacement of the measuring probe 34 b, the coordinate of themeasuring probe 34 b on the machine coordinate system determined by theX-Y-Z position reading unit 18 and the center coordinate O_(CS) of theend surface of the spindle 14 explained in the embodiments describedabove. At the same time, the calculating unit 24 determines the value ofthe position of the edge of the tool mounted on the spindle relative tothe reference position of the workpiece based on the value of thereference position of the workpiece relative to the reference positionon the machine coordinate system described above, the value of thereference position of the spindle relative to the reference position onthe machine coordinate system described above and the value of thereference position of the tool edge relative to the reference positionof the spindle. The value of the relative position of tool edge thusdetermined is sent out to the correcting unit 22. The correcting unit 22generates a correction value based on this value and sends it to theoperation command unit 20 c.

Next, a detailed explanation will be given of a method and an apparatusfor measuring the coordinate position of the cutting edge of the tool Tusing the tool edge position measuring unit 30 according to stillanother embodiment with reference to FIGS. 8, 9 and 10.

FIG. 8 is a block diagram showing a configuration for measuring the edgeposition of the tool T along Z-axis using the tool edge positionmeasuring unit 30, and FIGS. 9A, 9B flowcharts showing the operation ofmeasuring the tool edge position and the length of the tool T alongZ-axis.

In the machine tool 10 shown in FIG. 8, the table 16 for fixing theworkpiece w is arranged movably in a horizontal X-Y plane by X- andY-feed motors (not shown) on the upper surface of a bed 56. The spindleunit 12 includes the spindle 14 having mounted the tool T thereon andsupported rotatably in the spindle housing. The spindle unit 12 ismounted on the front surface of a column 58 erected on the bed 56movably by the Z-axis feed motor M_(Z) along Z-axis perpendicular to theX-Y plane. The Z coordinate of the spindle 14 is read by a digital scale70. The tool edge position measuring unit 30 is fixed in opposedrelation to the spindle 14 on the upper surface of the table 16. Thetool edge position measuring unit 30 is a contacting or non-contactingdisplacement sensor capable of measuring the amount of displacement. Anexample of the tool edge position measuring unit of contacting type isan optical or magnetic digital scale or a differential transformer. Anexample of the tool edge position measuring unit of non-contacting typeis of a type using laser, electrostatic capacitance or eddy current. Adisplacement sensor of contacting type will be explained below as anexample.

First, a measurement macroprogram 60 for measuring the edge position ofthe tool T along Z-axis is decoded by a reading and interpreting unit 62of the NC device, so that the tool T mounted on the spindle 14 is set inposition at the X-Y coordinate position just above the tool edgeposition measuring unit 30 (step S1). Then, the Z-axis feed motor M_(Z)is driven, and the spindle unit 12 begins to move down along Z-axis at apredetermined speed (step S2). These operations are performed accordingto a well-known procedure in which the position command sent out of thereading and interpreting unit 62 flows through an interpolationcalculating unit 64, a position control unit 66 and a servo-control unit68 of the NC device. The present position S_(Z) along Z-axis detected bythe digital scale 70 is fed back to the position control unit 66.

On the other hand, a macro calculation command is sent out from thereading and interpreting unit 62 to the tool edge position calculatingunit 72 and the tool length calculating unit 78. The macro calculationcommand contains a signal for determining whether the displacementoutput value and the Z coordinate of the tool edge position measuringunit 30 value are read after stopping the operation along Z-axis orduring the operation along Z-axis before stopping it. As tool edgeposition measuring unit 30 begins to detect the displacement in step S3,the displacement amount D_(Z) is sent out to the tool edge positioncalculating unit 72. In the case where the displacement output value andthe Z coordinate position are read after stopping the operation alongZ-axis (YES in step S4), a Z-axis stop command is issued to the positioncontrol unit 66 through a stop command generating unit 74 by a skipsignal generated from the tool edge position measuring unit whenreaching a predetermine output value (step S5). With the Z-axisoperation stopped in this way, the displacement amount D_(Z) detectedfrom the tool edge position measuring unit 30 and the commanded presentposition P_(Z) from the position control unit 66 or the present positionS_(Z) from the digital scale 70 is read by the tool edge positioncalculating unit 72 (step S6).

In the case where the answer in step S4 is NO, the process proceeds tostep S7 where the tool edge position calculating unit 72 simultaneouslyreads the displacement amount D_(Z) detected from the tool edge positionmeasuring unit 30 and the commanded present position P_(Z) from theposition control unit 66 or the present position S_(Z) from the digitalscale 70 (step S7). After that, a stop command is issued from the stopcommand unit 74 to the position control unit 66 thereby to stop theoperation along Z-axis (step S8). Assume that the commanded presentposition P_(Z) from the position control unit 66 is employed as acoordinate position on the machine coordinate system. The tool edgeposition calculating unit 72 reads the calibration value C_(Z) measuredand stored in advance in the data storage unit 76 (step S9), and usingthe displacement amount D_(Z) and the commanded present position P_(Z)read earlier, the coordinate position T_(Z) of the tool edge iscalculated according to the following equation (step S10)T _(Z) =P _(Z) +D _(Z) +C _(Z)

In the case where the macro calculation command includes no demand tocalculate the tool length (NO in step S11), the value of the coordinateposition T_(Z) of the tool edge is registered in the data storage unit76 (step S12). In the case where the macro calculation command containsthe demand to calculate the tool length (step YES in step S11), on theother hand, the reference position S_(P) measured and stored in advancein the data storage unit 76 is read by the tool length calculating unit78 (step S13). The tool edge coordinate position T_(Z) calculatedearlier is read from the tool edge position calculating unit 72, and thetool length TL is calculated from the following equation (step S14)TL=T _(Z) −S _(P)

The tool length thus calculated is registered in the storage unit 76(step S15). The reference position information S_(P) is determined inadvance by a method similar to the above-mentioned method of calculatingthe coordinate position, in which the end surface of the spindle or theforward end surface of a master piece of a known length mounted on thespindle 14 is brought into contact with the tool edge position measuringunit 30. The reference position information S_(P) thus determined isstored in the data storage unit 76.

After that, the Z-axis operates to come off from the tool edge positionmeasuring unit 30 (step S16), thereby ending the series of operation formeasuring the coordinate position of the tool edge and the tool length.

The tool edge position T_(Z) and the tool length TL registered in thedata storage unit 76 are employed as a correction value for the NCprogram or an offset value of the tool length for machining theworkpiece with the tool T, and sent out to the operation command unit 20c through the correcting unit 22 shown in FIG. 1.

In step S63, the commanded present position P_(Z) is employed as thecoordinate position of the tool edge. The result of a higher accuracycan be obtained, however, by receiving the position deviation from theservo-control unit 68 and employing the sum of the commanded presentposition P_(Z) and the position deviation as a coordinate position ofthe tool edge.

The tool edge position is measured before and after machining theworkpiece, and the difference is calculated thereby to determine theamount of tool wear in longitudinal direction.

In the method described above, a displacement sensor such as the tooledge position measuring unit 30 is disposed on the table 16 to measurethe position along Z-axis of the tool edge on the spindle 14 in relativemotion with the table or the reference surface of the spindle endsurface or the master piece. The position along X and Y axes can also bemeasured by a similar method. An example application of measurement ofthe position along X and Y axes is to measure the edge diameter of thetool T. Two diametrical positions of the tool are measured by adisplacement sensor displaceable along X or Y-axis, and the differenceis calculated to determine the tool edge diameter. In that case, thecalibration data (calibration value) is determined in advance as wellknown using a master piece of a known diameter. Alternatively, theamount of tool wear along the too diameter can be determined bymeasuring the tool edge diameter before and after machining theworkpiece and calculating the difference.

As another alternative, a displacement sensor is arranged on the spindle14 and brought into contact with the reference surface of the workpieceon the table 16, the reference surface of the workpiece fixture and thereference surface of the table 16 to measure the X, Y or Z position ofthese reference surfaces. As an example of the application, a step ordistance formed between two surfaces of the workpiece can be determinedby calculating the position difference between the surfaces measured.

Further, it is easily understood that the invention is not limited tothe measurement for the machine tool, but is applicable also to such amachine as a three-dimensional measuring instrument, a robot or a toolpresetter with the component members relatively moved to each other. Insuch a case, the coordinate position of a measured portion of an objectto be measured can be determined by calculations from the output valueof a displacement sensor (displacement detection means) and thecoordinate position on the machine coordinate system. Especially, withthe tool presetter, which measures the length and diameter of a toolused in an NC machine tool in advance and registers the result in an NCdevice, the aforementioned method of measuring the tool length and thetool edge diameter of the machine tool is directly applicable. Themethod of measuring the length and diameter of the tool in the presetterwill not be described.

It is also possible to realize a machine tool and a method of machininga workpiece using such a machine tool, which has the functions ofmeasuring the tool edge position, the tool length, the tool edgediameter, the amount of tool wear, the coordinate position of theworkpiece portion to be measured and a work step.

The NC devices shown in FIGS. 1 and 8 are so related to each other thatthe program storage unit 20 a corresponds and operates substantiallysimilarly to the machining program 60 including a measurementmacroprogram, the program analysis unit 20 b to the reading andinterpreting unit 62, the operation command unit 20 c to theinterpolation calculating unit 64, and the axial motion command unit 20d to the position control unit 66 and the servo-control unit 68.

As described above, according to this invention, the tool edge positionwith respect to the reference coordinate position is determined throughtwo steps including a first step for measuring the reference portion ofthe spindle with respect to the reference position of the machine tooland a second step for measuring the tool edge position with reference tothe reference portion of the spindle. The advantage of measuring thereference portion of the spindle in the first step, in which theposition of a portion having a comparatively simple shape such as theend surface or the cylindrical side surface of the spindle or the masterpiece is measured, is that the measurement can be conducted whilerotating the spindle at the same rotational speed as in the actualmachining process. The reference position of the spindle displaced witha hysteresis can be measured with high accuracy periodically.

In the second step, on the other hand, the measurement of a higheraccuracy can be achieved by stopping the spindle for measuring theposition of the tool edge having a complicated shape. The tool edgeposition with respect to the reference coordinate position is determinedby calculations from the result of measurement in these two steps,thereby making it possible to obtain the calculation result of a higheraccuracy.

Also, the amount of thermal displacement of the spindle can be measuredin the first step and the amount of tool wear and the tool mountingerror on the spindle in the second step. In the conventional method inwhich the tool edge position is directly measured, unlike in theinvention, the amount of thermal displacement of the spindle, the toolmounting error and the tool wear amount cannot be determined separatelyfrom each other. According to the invention, on the other hand, theseamounts can be determined separately from each other, and therefore, itis easy to introduce a method for minimizing the displacement amount andthe error amount.

In the actual machining process, it is important to determine therelative values between the reference position on the upper surface ofthe table and the tool edge position, and between the workpiecereference position and the tool edge position. These relative values areincluded in the relative value between the reference coordinate positionand the tool edge position written in the appended claims. This isbecause of the necessity primarily to calibrate the reference positionon the upper surface of the table and the reference position of theworkpiece with respect to the reference coordinate position, i.e. toclarify the positions relative to the reference coordinate position.

Further, the change in the tool edge position at each moment can becorrected by continuously measuring the reference portion of the spindlewith respect to the spindle housing during the machining process, thuscontributing to an improved workpiece machining accuracy.

The output value of the displacement measuring means of contacting ornon-contacting type and the coordinate position on the machinecoordinate system associated with the particular output value aredetected, and based on these two values, the coordinate position of aportion to be measured of an object of measurement is determined bycalculations. Therefore, unlike in the conventional method of touchprobe type for detecting the coordinate position at the moment ofcontacting, the method according to the invention has a highermeasurement accuracy with the measurement accuracy not varied with thefeed rate at the time of contacting. As a result, the displacementmeasuring means can be brought near to the portion to be measured at amaximum speed, thereby shortening the measurement time.

This basic measurement method is applicable to the reference portion ofthe spindle, the reference portion of the table, the tool edge, etc.Also, as an application, the tool length, the tool edge diameter, thetool wear amount, the workpiece step, etc. can be measured. A machinetool, a machining method and even a tool presetter having themeasurement method and the measuring unit described above have beenrealized, thereby effectively improving the workpiece machiningaccuracy.

1. An apparatus for measuring the position of a cutting edge of a toolmounted to a spindle of an NC machine tool, comprising: feed shaftposition reading means for reading the coordinate position of thecoordinate system of the machine tool; first shaft reference positionmeasuring means, provided on a constitutional member movable relative tothe spindle, for measuring the coordinate position of the referenceposition of the spindle in the coordinate system; tool cutting edgeposition measuring means, provided on a constitutional member movablerelative to the spindle, for measuring the position of a cutting edge ofa tool relative to a reference position of the spindle; and calculationmeans for calculating the coordinate position of the cutting edge of atool in the coordinate system on the basis of the coordinate position ofthe reference position in the coordinate system measured by the feedshaft position reading means and the first shaft reference positionmeasuring means and the position of the cutting edge of the toolrelative to the reference position of the spindle measured by the feedshaft position reading means and the tool cutting edge positionmeasuring means.
 2. An apparatus for measuring the position of a cuttingedge of a tool according to claim 1, wherein the tool cutting edgeposition measuring means comprises a contacting or non-contactingdisplacement measuring sensor.
 3. An apparatus for measuring theposition of a cutting edge of a tool according to claim 1, wherein thereference position of the spindle is provided on the end of the spindleor on a masterpiece which has known dimensions and is attached to thespindle.
 4. An apparatus for measuring the position of a cutting edge ofa tool according to claim 1, wherein the first shaft reference positionmeasuring means and/or the tool cutting edge position measuring meansincludes contacting or non-contacting displacement measuring means whichcan measure the axial displacement in least one axial direction of X-,Y- and Z-axis whereby the coordinate position of the reference positionof the spindle or the cutting edge of the tool relative to the referenceposition of the displacement measurement means in the coordinate systemcan be calculated on the basis of the output values of the displacementmeasuring means and the feed shaft position reading means at apredetermined measurement timing after moving the reference position ofthe spindle or the cutting edge of the tool into the measurement rangeof the displacement measuring means through the relative movement alonga direction same as a measurable direction of the displacement measuringmeans.
 5. An apparatus for measuring the position of a cutting edge of atool according to claim 4, wherein the output value of the feed shaftposition reading means is selected from the value of the indication of afeed shaft position reading means provided on a feed shaft, an NCcommand value for a feed shaft or a position obtained on the basis of anNC command value for a feed shaft added with a position deviationobtained from a servo-control unit.
 6. An apparatus for measuring theposition of a cutting edge of a tool mounted to a spindle of an NCmachine tool, comprising: feed shaft position reading means for readingthe coordinate position of the coordinate system of the machine tool;position measuring means, provided on a constitutional member movablerelative to the spindle, for measuring the coordinate position of thereference position of the spindle in the coordinate system and theposition of a cutting edge of a tool relative to the reference positionof the spindle; and calculation means for calculating the coordinateposition of the cutting edge of a tool in the coordinate system on thebasis of the coordinate position of the reference position of thespindle in the coordinate system measured by the feed shaft positionreading means and the position measuring means and the position of thecutting edge of the tool relative to the reference position of thespindle measured by the feed shaft position reading means and theposition measuring means.
 7. An apparatus for measuring the position ofa cutting edge of a tool mounted to a spindle of an NC machine tool,comprising: feed shaft position reading means for reading the coordinateposition of the coordinate system of the machine tool; first shaftreference position measuring means, provided on a constitutional membermovable relative to the spindle, for measuring the coordinate positionof the reference position of the spindle in the coordinate system; toolcutting edge position measuring means, provided on a constitutionalmember movable relative to the spindle, for measuring the position of acutting edge of a tool relative to a reference surface of the spindle;second shaft reference position measuring means, provided on a spindlehousing of the NC machine tool, for measuring the changes in theposition of the reference position of the spindle relative to thespindle housing during the rotation; and calculation means forcalculating the coordinate position of the cutting edge of a tool in thecoordinate system during the rotation of the spindle on the basis of thecoordinate position of the reference position of the spindle in thecoordinate system measured by the feed shaft position reading means andthe first shaft reference position measuring means, the position of thecutting edge of the tool relative to the reference position of thespindle measured by the feed shaft position reading means and the toolcutting edge position measuring means and the changes in the position ofthe reference position of the spindle during the rotation measured bythe second shaft reference position measuring means.
 8. A machine toolfor machining a workpiece with a numerically controlled relativemovement between a spindle to which a tool is mounted and a table towhich the workpiece is fixed, comprising: feed shaft position readingmeans for reading the coordinate position of the coordinate system ofthe machine tool; first shaft reference position measuring means,provided on a constitutional member movable relative to the spindle, formeasuring the coordinate position of the reference position of thespindle in the coordinate system; tool cutting edge position measuringmeans, provided on a constitutional member movable relative to thespindle, for measuring the position of a cutting edge of a tool relativeto a reference surface of the spindle; calculation means for calculatingthe coordinate position of the cutting edge of a tool in the coordinatesystem on the basis of the coordinate position of the reference positionof the spindle in the coordinate system measured by the feed shaftposition reading means and the first shaft reference position measuringmeans and the position of the cutting edge of the tool relative to thereference position of the spindle measured by the feed shaft positionreading means and the tool cutting edge position measuring means, andcorrecting means for correcting the numeric control command on the basisof the coordinate position of the cutting edge of a tool in thecoordinate system calculated by the calculating means.
 9. A machine toolfor machining a workpiece with a numerically controlled relativemovement between a spindle to which a tool is mounted and a table towhich the workpiece is fixed, comprising: feed shaft position readingmeans for reading the coordinate position of the coordinate system ofthe machine tool; first shaft reference position measuring means,provided on a constitutional member movable relative to the spindle, formeasuring the coordinate position of the reference position of thespindle in the coordinate system; tool cutting edge position measuringmeans, provided on a constitutional member movable relative to thespindle, for measuring the position of a cutting edge of a tool relativeto a reference surface of the spindle; workpiece reference positionmeasuring means for measuring the coordinate position of the referenceposition of the workpiece in the coordinate system; calculation meansfor calculating the position of a cutting edge of a tool relative to thereference position of the workpiece on the basis of the coordinateposition of the reference position of the spindle in the coordinatesystem measured by the feed shaft position reading means and the firstshaft reference position measuring means the position of the cuttingedge of the tool relative to the reference position of the spindlemeasured by the feed shaft position reading means and the tool cuttingedge position measuring means and the coordinate position of thereference position of the workpiece in the coordinate system measured bythe feed shaft position reading means and the workpiece referenceposition measuring means; and correcting means for correcting thenumeric control command on the basis of the position of a cutting edgeof a tool relative to the reference position of the workpiece calculatedby the calculating means.